Skip to content

Add vignette for Random Forest Survival Analysis and update DESCRIPTION#68

Merged
ehrlinger merged 9 commits into
mainfrom
pkgdown-site
Mar 28, 2026
Merged

Add vignette for Random Forest Survival Analysis and update DESCRIPTION#68
ehrlinger merged 9 commits into
mainfrom
pkgdown-site

Conversation

@ehrlinger
Copy link
Copy Markdown
Owner

@ehrlinger ehrlinger commented Mar 27, 2026

This pull request introduces several improvements and fixes across documentation, CI workflows, package metadata, and the gg_partial_rfsrc function. The most significant change is a major enhancement to gg_partial_rfsrc, which now automatically handles time point alignment for survival forests and allows for more efficient evaluation grids. Additional updates improve documentation, add new suggested packages, and strengthen CI and coverage reporting.

Enhancements to gg_partial_rfsrc and Documentation:

  • The gg_partial_rfsrc function now automatically snaps requested partial.time values to the nearest available time.interest values in survival forests, preventing prediction errors and making the function more robust. It also adds new arguments partial.time and n_eval for finer control, and uses quantile grids for continuous predictors to improve speed and smoothness. Documentation and Rd files are updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8]

Continuous Integration and Coverage Improvements:

  • The GitHub Actions workflows for R CMD check and standard checks are updated to handle R-devel failures gracefully (e.g., due to upstream changes like the lazyeval PREXPR removal), with steps to bootstrap rcmdcheck and allow failures on R-devel without failing the whole workflow. [1] [2] [3] [4]
  • Adds a codecov.yml configuration file to enforce minimum code coverage thresholds (65% for main, 60% for PR patches) and configures reporting behavior.
  • Ignores codecov.yml in R builds by updating .Rbuildignore.

Package Metadata and Documentation:

  • Updates the package version to 2.7.0.9001 and the date, and adds knitr and plotly to Suggests in DESCRIPTION. [1] [2]
  • Updates _pkgdown.yml to add new tutorial articles to the documentation site.

Cleanup:

  • Removes the .claude/settings.local.json file, cleaning up project configuration.This pull request adds several improvements and enhancements to the gg_partial_rfsrc function and its documentation, as well as minor updates to package metadata and CI workflow configuration. The most important changes are the addition of new arguments and logic to better handle survival forests and continuous variables, improved documentation, and updates to continuous integration for better R-devel compatibility.

Enhancements to gg_partial_rfsrc:

  • Added partial.time argument to gg_partial_rfsrc, allowing users to specify desired time points for survival forests. Values are automatically snapped to the nearest available time.interest value to avoid errors in randomForestSRC::partial.rfsrc. Default behavior now uses three quartile points of time.interest if partial.time is NULL. [1] [2] [3] [4] [5] [6]
  • Added n_eval argument to control the number of evaluation points for continuous predictors, improving performance by evaluating on a quantile grid instead of all observed values. [1] [2] [3] [4]
  • Refactored internal logic to use helper functions for evaluation grid creation and partial dependence calculation, improving code clarity and maintainability. [1] [2]

Documentation improvements:

  • Expanded Roxygen and Rd documentation for gg_partial_rfsrc to describe the new arguments, survival forest handling, and best practices for logical predictors. [1] [2] [3] [4]

Continuous integration and metadata updates:

  • Updated GitHub Actions workflows to allow R-devel jobs to fail without failing the whole workflow, due to potential upstream incompatibilities. [1] [2]
  • Updated package version to 2.7.0.9001 and date in DESCRIPTION. Added knitr and plotly to Suggests. [1] [2]
  • Added a Tutorials section to the pkgdown site configuration.
  • Removed the .claude/settings.local.json file.

- Introduced a comprehensive vignette detailing the workflow for random survival forest analysis using the PBC dataset.
- Included sections on data preparation, exploratory data analysis, model fitting, variable selection, and visualization techniques.
- Added references to relevant literature in a new bibliography file.
…ss known issues with partial dependence plots
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 78.65169% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.59%. Comparing base (c6ac948) to head (a44d9d0).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
R/plot.gg_partial.R 69.60% 38 Missing ⚠️
R/gg_partial_rfsrc.R 85.00% 15 Missing ⚠️
R/gg_survival.R 84.61% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
- Coverage   84.73%   83.59%   -1.14%     
==========================================
  Files          24       25       +1     
  Lines        1801     2005     +204     
==========================================
+ Hits         1526     1676     +150     
- Misses        275      329      +54     
Files with missing lines Coverage Δ
R/gg_partial.R 100.00% <100.00%> (ø)
R/gg_partialpro.R 100.00% <100.00%> (ø)
R/plot.gg_survival.R 97.80% <100.00%> (+1.02%) ⬆️
R/surv_partial.rfsrc.R 100.00% <100.00%> (ø)
R/gg_survival.R 89.47% <84.61%> (-10.53%) ⬇️
R/gg_partial_rfsrc.R 86.23% <85.00%> (-10.49%) ⬇️
R/plot.gg_partial.R 69.60% <69.60%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This comment was marked as resolved.

- Updated `plot.gg_survival` to automatically handle raw `rfsrc` objects.
- Deprecated `surv_partial.rfsrc` in favor of `gg_partial_rfsrc`, with appropriate warning messages.
- Enhanced documentation for `gg_survival`, `gg_partial_rfsrc`, and related functions to clarify usage and parameters.
- Added new plotting methods for `gg_partial`, `gg_partial_rfsrc`, and `gg_partialpro` to streamline visualization of partial dependence curves.
- Improved test coverage for new plotting functions and ensured deprecation warnings are handled in tests.
- Updated vignettes to reflect changes in function usage and provide examples for new plotting capabilities.
…nd update pkgdown configuration to include new plot methods
…scalar_int helper for improved error handling
@ehrlinger ehrlinger merged commit e4e2e0c into main Mar 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants